import React from 'react'




export default function withLoading(WithComponent) {
  function NewComponent({ isLoading, ...props }) {
    return (
      <div>
      {isLoading && <div>Loading...</div>}
      {isLoading === false && <WithComponent {...props} />}
      </div>
    )
  }
  return NewComponent
}
